#ifdef USE_TAGLIB
#include "tmetadataloader.h"
#endif

#include <QtGui>
#include <QApplication>
#include "mainwindow.h"
#include "metadatavalue.h"
#include "episodes.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    app.setApplicationName("M3uPlayer");
    app.setOrganizationName("ics");
    app.setOrganizationDomain("com");
    qRegisterMetaType<MetaDataValue>("MetaDataValue");
    qRegisterMetaType<Subscription>("Subscription");
    qRegisterMetaType<Episode>("Episode");

#ifdef USE_TAGLIB
    TagLib::MetaDataLoader::instance();
#endif

    MainWindow mw;

#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
    mw.setAttribute(Qt::WA_LockPortraitOrientation);
    mw.showMaximized();
#else
    QFile f(":/belle.qss");
    f.open(QIODevice::ReadOnly);
    QByteArray styleSheet = f.readAll();
    mw.setStyleSheet(QString(styleSheet));
    mw.show();
#endif
    return app.exec();
};
